/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package CCPVSimulationPackage;


import coalition.formation.UtilityProvider;
import java.util.List;
import java.util.Random;

/**
 *
 * @author Heather
 */
public class DummyUtilityProvider implements UtilityProvider
{
  int[] dimensions;
  Random randGen = new Random();

  public DummyUtilityProvider()
  {
    
  }

  public float[] getUtilities(List<List<int[]>> partition)
  {
    float[] ret = new float[partition.size()];

    for (int i = 0; i < ret.length; i++)
    {
      ret[i] = randGen.nextFloat();
    }

    return ret;
  }

  public int[] getDimensions()
  {
    return dimensions;
  }

  public void setDimensions(int[] dimensions)
  {
    int[] newD = new int[dimensions.length];
    for (int i = 0; i < newD.length; i++)
    {
      newD[i] = dimensions[i];
    }
    
    this.dimensions = newD;
  }
}
